#include <cstdio>

int main() {
	FILE * fp = fopen("1.in", "w");
	fprintf(fp, "100000 30\n");
	for (int i=0; i<20000; i++) {
		fprintf(fp, "%d\n", i);
	}
	for (int i=20000; i<40000; i++) {
		fprintf(fp, "%d\n", (1<<30)-1);
	}
	for (int i=40000; i<100000; i++) {
		fprintf(fp, "%d\n", i);
	}
	fclose(fp);
	return 0;
}
